﻿//-----------------------------------------------------------------------
// <copyright file="MLMethodParameter.cs" company="MAPILab Ltd">
//     Copyright (c) MAPILab Ltd.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace MAPILab.SharePoint.Explorer.CodeForm
{
    using System.Reflection;

    /// <summary>
    /// Class for method parameter to use it in code form
    /// </summary>
    public class MLMethodParameter
    {
        #region Fields

        /// <summary>
        /// object value
        /// </summary>
        private object objectValue;

        /// <summary>
        /// method parameter info
        /// </summary>
        private MethodInfo methodInfo;

        /// <summary>
        /// method parameters name
        /// </summary>
        private string mainParamName;

        #endregion

        #region Properties

        /// <summary>
        /// Get and set object value
        /// </summary>
        public object ObjectValue
        {
            get { return this.objectValue; }
            set { this.objectValue = value; }
        }

        /// <summary>
        /// Get and set method parameter information
        /// </summary>
        public MethodInfo MethodInfo
        {
            get { return this.methodInfo; }
            set { this.methodInfo = value; }
        }

        /// <summary>
        /// Get and set method parameters name
        /// </summary>
        public string MainParamName
        {
            get { return this.mainParamName; }
            set { this.mainParamName = value; }
        }

        #endregion

        #region Constructor

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="objectValue">Object value</param>
        /// <param name="methodInfo">Method information</param>
        public MLMethodParameter(object objectValue, MethodInfo methodInfo):this()
        {
            this.objectValue = objectValue;
            this.methodInfo = methodInfo;
        }

        /// <summary>
        /// Default constructor
        /// </summary>
        public MLMethodParameter() { }

        #endregion
    }
}
